CC = arm-linux-gcc
PREFIX = /usr/local/arm/3.4.1/arm-linux
INCPATH = -I$(PREFIX)/include -I./ -I../../include
LIBPATH = -L$(PREFIX)/lib -L../../lib
CFLAG = -Wall -g
LDFLAG =
DBG_LDFLAG =
REL_LDFLAG =

TPATH = $(shell pwd)
BASENAME = $(notdir $(TPATH))
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)
TARGET = $(BASENAME)

debug : $(OBJ)
	$(CC) $(CFLAG) $(LDFLAG) $(INCPATH) $(LIBPATH) -lpthread -ltmf_measure -ltmf_comm $(OBJ) -o $(TARGET)
	
release : $(OBJ)
	$(CC) $(CFLAG) $(LDFLAG) $(INCPATH) $(LIBPATH) -lpthread -ltmf_measure -ltmf_comm $(OBJ) -o $(TEST_TARGET)

%.o : %.c
	$(CC) $(CFLAG) -c $(INCPATH) $< -o $@

.PHONY : clean
clean:
	rm -f *.o $(TARGET)
